import 'package:boss/ui/page/index/model/bottom_navigation.dart';
import 'package:boss/ui/page/index/widget/custom_bottom_navigation_bar.dart';
import 'package:boss/ui/page/tableManagement/page/areaManagement/area_management_page.dart';
import 'package:boss/ui/page/tableManagement/page/plusBatchTable/plus_batch_table_page.dart';
import 'package:boss/ui/page/tableManagement/page/sortTable/sort_table_page.dart';
import 'package:boss/ui/page/tableManagement/page/tableDetail/table_detail_page.dart';
import 'package:flutter/material.dart';

class TableManagementFooter extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return CustomBottomNavigationBar(
      items: [
        BottomNavigation(
          title: '管理区域',
          icon: 'assets/image/area_icon.png',
        ),
        BottomNavigation(
          title: '新增桌台',
          icon: 'assets/image/rect_plus_icon.png',
        ),
        BottomNavigation(
          title: '批量新增',
          icon: 'assets/image/operating_icon.png',
        ),
        BottomNavigation(
          title: '桌台排序',
          icon: 'assets/image/sort_icon.png',
        ),
      ],
      onSelectChanged: (index) {
        switch (index) {
          case 0:
            Navigator.pushNamed(context, AreaManagementPage.pageName);
            break;
          case 1:
            Navigator.pushNamed(context, TableDetailPage.pageName);
            break;
          case 2:
            Navigator.pushNamed(context, PlusBatchTablePage.pageName);
            break;
          case 3:
            Navigator.pushNamed(context, SortTablePage.pageName);
            break;
          default:
        }
      },
    );
  }
}
